<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script>
var a = "window.a";
function f(){
    alert(a);
}
alert(window.a); 
window.f();


</script>
</head>
<body>
</body>
</html>